Skip to content

feat(infra): IaC foundation — Terraform modules + Helm chart skeleton (Step 0.9) - #34

Merged
officialCodeWork merged 3 commits into
mainfrom
build/phase-0/step-0.9-iac-foundation
May 23, 2026
Merged

feat(infra): IaC foundation — Terraform modules + Helm chart skeleton (Step 0.9)#34
officialCodeWork merged 3 commits into
mainfrom
build/phase-0/step-0.9-iac-foundation

Conversation

@officialCodeWork

Copy link
Copy Markdown
Owner

Summary

  • Terraform modules (Kubernetes-native, helm + kubernetes providers) for all four core backends: Postgres/pgvector, Redis, Qdrant, Elasticsearch — each a self-contained module under infra/terraform/modules/ with consistent variables.tf / main.tf / outputs.tf
  • Two environmentsinfra/terraform/environments/dev/ (local cluster, minimal resources, local state) and infra/terraform/environments/prod/ (HA sizing, S3 backend stub, production credentials via variables)
  • Helm chart (infra/helm/rag-platform/) for the gateway service: Deployment (ConfigMap-mounted rag.yaml, Secret-injected DB creds, read-only rootfs), Service, HPA, PodDisruptionBudget, Ingress, ServiceAccount; values.dev.yaml for single-replica local deploys
  • CI gate — new iac job in ci.yml runs terraform validate -backend=false + helm lint/template dry-run on every infra/ change; wired into the ci-pass required check
  • Task targetstask infra:init, task infra:validate, task infra:plan, task helm:lint, task helm:template

Documentation

Test plan

  • task infra:validate passes (requires terraform CLI)
  • task helm:lint passes (requires helm CLI)
  • task helm:template renders without errors
  • CI iac job passes on PR

🤖 Generated with Claude Code

Deep Kumar Singh Kushwah and others added 3 commits May 24, 2026 00:16
… (Step 0.9)

Terraform (Kubernetes-native, helm + kubernetes providers):
- modules/postgres  — Bitnami postgresql chart, pgvector image override, K8s Secret
- modules/redis     — Bitnami redis chart, standalone/replication modes
- modules/qdrant    — Official qdrant chart, configurable replicas + storage
- modules/elasticsearch — Bitnami elasticsearch chart, security toggle dev/prod
- Root module wires all four backends with per-backend enable flags
- environments/dev  — local cluster (docker-desktop/kind), minimal resources, local state
- environments/prod — production sizing (3× Qdrant replicas, 100–200 Gi), S3 backend stub

Helm chart (infra/helm/rag-platform/):
- Deployment with ConfigMap-mounted rag.yaml, Secret env var injection, read-only rootfs
- Service, HPA (CPU+memory), PodDisruptionBudget, Ingress, ServiceAccount
- values.dev.yaml override for single-replica, minimal-resource local deploys
- NOTES.txt with post-install port-forward instructions

CI gate (ci.yml):
- New infra path filter (infra/terraform/**, infra/helm/**)
- New iac job: terraform init -backend=false + validate for dev + prod; helm lint + template dry-run
- iac job added to ci-pass required gate

Task targets: task infra:init / infra:validate / infra:plan / helm:lint / helm:template
Docs: docs/architecture/iac.md, docs/adr/ADR-0003-iac-kubernetes-native.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…t semver ranges

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ment conflict

'version' is reserved for registry modules in a module block. Using it with a
local-path source caused Terraform to reject the source as an invalid registry
address. Renamed to app_version across all four backend modules, root
variables.tf, root main.tf, and both environment main.tf files.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@officialCodeWork
officialCodeWork force-pushed the build/phase-0/step-0.9-iac-foundation branch from 0a984ae to f36cc9f Compare May 23, 2026 19:10
@officialCodeWork
officialCodeWork merged commit a23ddf7 into main May 23, 2026
8 checks passed
officialCodeWork added a commit that referenced this pull request May 23, 2026
chore(tracker): sync PR links for steps 0.7b–0.9 and history #28#34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant